<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
  <script src="../lib/vue.js"></script>
</head>
<body>
<div id="root">
  <p>{{num}}</p>
  <one :fn="fn"></one>
</div>
</body>
<script>
  new Vue({
    el : '#root',
    data:{
      num : 1
    },
    methods :{
      fn(num){
        this.num = num;
      }
    },
    components :{
      One:{
        props:['fn'],
        template :(`
          <p @click="fn(200)">2222</p>
        `)
      }
    }
  })
</script>
</html>